﻿using CatUtils.Utils.Helper;
using System;
using System.Collections.Generic;

namespace CatUtils.Utils.Currency
{
    /// <summary>
    /// 打印日志的方法
    /// </summary>
    public partial class PrintLog
    {
        /// <summary>
        /// 错误日志存放路径
        /// </summary>
        public static string ErrorLogPath { get; } = StaticValue.LogFloder + "ErrorLog.txt";

        /// <summary>
        /// string format  支持三个参数拼接。
        /// </summary>
        /// <param name="format"></param>
        /// <param name="arg0"></param>
        /// <param name="arg1"></param>
        /// <param name="arg2"></param>
        public static void Log(string format, object arg0, object arg1, object arg2)
        {
            string text = string.Format(format, arg0, arg1, arg2);
            V(text);
        }

        /// <summary>
        /// string format  支持两个个参数拼接。
        /// </summary>
        /// <param name="format"></param>
        /// <param name="arg0"></param>
        /// <param name="arg1"></param>

        public static void Log(string format, object arg0, object arg1)
        {
            string text = string.Format(format, arg0, arg1);
            V(text);
        }

        /// <summary>
        ///  string format  支持一个参数拼接。
        /// </summary>
        /// <param name="format"></param>
        /// <param name="arg0"></param>
        public static void Log(string format, object arg0)
        {
            string text = string.Format(format, arg0);
            V(text);
        }

        /// <summary>
        /// 打印日志
        /// </summary>
        /// <param name="Log"></param>
        public static void Log(string Log)
        {
            V(Log);
        }

        /// <summary>
        /// 打印日志
        /// </summary>
        /// <param name="Log"></param>
        public static void Log(Exception Log)
        {
            E(GetExceptionMessage(Log));
        }

        /// <summary>
        /// 打印日志
        /// </summary>
        /// <param name="Log"></param>
        public static void Log(List<string> Log)
        {
            foreach (string line in Log)
            {
                V(line);
            }
        }
    }
}